package org.tis.tools.senior.module.developer.controller.request;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.tis.tools.model.enums.CommonEnumDeserializer;
import org.tis.tools.senior.module.developer.entity.enums.AttentionType;
import org.tis.tools.senior.module.developer.entity.enums.ProceedsStatus;
import org.tis.tools.senior.module.developer.entity.enums.WorkSource;
import org.tis.tools.senior.module.developer.entity.enums.WorkType;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.util.Date;
import java.util.List;


/**
 * description:
 *
 * @author lijh
 * @date 2018/7/30
 **/
@Data
public class WorkitemAddAndUpdateRequest {

    public interface add{}
    public interface update{}

    @Null(message = "工作项guid必须为空！", groups = {WorkitemAddAndUpdateRequest.add.class})
    @NotNull(message = "工作项guid不能为空！", groups = {WorkitemAddAndUpdateRequest.update.class})
    private Integer guid;

    @NotBlank(message = "工作项名称不能为空")
    private String itemName;

    private String seqno;

    @NotBlank(message = "提交标识不能为空")
    private String artf;

    @NotBlank(message = "工作项开发人员不能为空")
    private String developers;

    @NotBlank(message = "工作项负责人不能不空")
    private String owner;

    private Integer workLoad;

    @NotNull(message = "工作项类型不能为空！")
    @JSONField(deserializeUsing = CommonEnumDeserializer.class)
    private WorkType workType;

    /**
     * 标签
     */
    private List<String> itemLable;

    @NotBlank(message = "工作项需求描述不能为空")
    private String requirementDesc;

    private Date receiveTime;

    private Date developStartTime;

    private Date deliveryPlanTime;

    private Date deliveryTime;


    /**
     * 补充信息的guid
     */
    private Integer guidSupplement;

    /**
     * 工作项guid外键
     */
    private Integer guidWorkitem;
    /**
     * 工作来源
     */
    private WorkSource workSource;

    /**
     * 报工工时
     */
    private String manHour;

    /**
     * 工作组
     */
    private String workGroup;

    /**
     * 工作项挣值
     */
    private String earnedValue;

    /**
     * 合同年度
     */
    private String compactYear;

    /**
     * BT状态描述
     */
    private String bt_statusDesc;

    /**
     * 收款比例
     */
    private String proceedsRatio;

    /**
     * 收款说明
     */
    private String proceedsDesc;

    /**
     * 应收款
     */
    private String accountReceivable;

    /**
     * 可收款标志
     */
    private String proceedsSign;

    /**
     * 收款状态
     */
    private ProceedsStatus proceedsStatus;

    /**
     * 关注类型
     */
    private AttentionType attentionType;

    /**
     * 关注说明
     */
    private String attentionDesc;
}
